<?php
// Include Nusoap.php file
require_once('nusoap/nusoap.php');

//CurrencyConvertorSoap
function myCurrencyConverter ($FromCurrency, $ToCurrency)
{
	$wsdlURL = "http://www.webservicex.com/CurrencyConvertor.asmx?wsdl";
	$soap = new mysoapclient($wsdlURL, "wsdl");

	$parameters['parameters']['FromCurrency'] = $FromCurrency;
	$parameters['parameters']['ToCurrency'] = $ToCurrency;

	$result = $soap->call('ConversionRate', $parameters);
	if ($result) {
		$rate = $result['ConversionRateResult'];
	}
	if($error = $soap->getError()){ die($error); }

	return $rate;
}
